import time
def file_function(filename):
    file = open(filename)
    data = file.readlines()
    data = list(map(int, data))
    return data
m1 = file_function("m1_sorted.txt")

def bubble_sort(a):
    for i in range(len(a) - 1):
        for j in range(len(a) - 1 - i):
            if a[j] > a[j + 1]:
                a[j], a[j + 1] = a[j + 1], a[j]
t_start_m1 = time.time()
bubble_sort(m1)
t_finish_m1 = time.time()
time_m1 = round((t_finish_m1 - t_start_m1) * 1000)
print(f'm1_sorted {time_m1} milliseconds')
# Программа на Python
